package com.example.springbootgoods.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.example.springbootgoods.entity.Brand;
import com.example.springbootgoods.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("api/brand")
public class BrandRestController {
    @Autowired
    BrandService brandService;

    @GetMapping("/selectAll/{classId}")
    public List<Brand> selectAll(@PathVariable int classId){
        return brandService.selectById(classId);
    }
}
